package com.zjpavt.taiyuan.controller;

import com.zjpavt.taiyuan.service.h3cCas.H3cCasService;
import com.zjpavt.taiyuan.service.h3cCas.pojo.BasicHostQueryResult;
import com.zjpavt.taiyuan.service.h3cCas.pojo.HostPoolQueryResult;
import com.zjpavt.taiyuan.service.h3cCas.pojo.HostQueryResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
public class MobileController {

    @Autowired
    private H3cCasService h3cCasService;

/*    @PostMapping("/mobile")
    @ResponseBody
    public String mobile(@Valid @RequestBody WeakParamSO weakParamSO) throws MethodArgumentNotValidException {
//        String deviceStatus = weakManagerService.getDeviceStatus(weakParamSO);
//        System.out.println(deviceStatus);
        return "";
    }*/
    @GetMapping ("/test/{id}")
    public String test(@PathVariable long id) {
        List<BasicHostQueryResult> basicInfomationSO = h3cCasService.basicInfomationQuery(id);
        return basicInfomationSO.toString();
    }
    @GetMapping ("/test/all")
    public String test1() {
        List<HostPoolQueryResult> basicInfomationSO = h3cCasService.hostPoolQuery();
        return basicInfomationSO.toString();
    }

    @GetMapping ("/host/all")
    public String test2() {
        List<HostQueryResult> hostQueryResults = h3cCasService.hostsQuery();
        return hostQueryResults.toString();
    }
}
